home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er Special 4
/
64er_Magazin_Sonderheft_04_86-04_1986_Markt__Technik_de_Disk_1_of_2_Side_A.d64
/
listing 01.a
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
12KB
|
372 lines
0 rem ***************************
1 rem gordon saga ii - 1985 by sm
2 rem ***************************
3 ifi=0theni=1:load"d.z.satz",8,1
4 poke648,204:poke53272,56:poke56576,0:print"[147]":rem d.t.satz aktivieren
5 open15,8,15:print"[147][158]";chr$(14);
6 side=2:gosub53200:print"[147]";
15 gosub60000: rem tabellen einlesen
20 dimwi(100): rem zimmer-merker
30 sc=0:mo=0 : rem score/versuch
40 sa=1:gosub53600 : rem titeltext
50 zn=1:gosub54000 : rem beschreib. 1.raum
100 rem start ------------------------------------------------------------------
101 :
110 ifsb<>0thensa=sb:sb=0:gosub53600:rem kommentar ausgeben
120 gosub50000 :rem befehlseingabe
130 :
300 rem geh-routine -----------------
310 ifri=0then400
320 i=map(zn,ri)
330 ifi=0thenprint"[196]iese [210]ichtung ist nicht m[185]glich!":goto400
340 zn=i:gosub54000
400 rem schau/untersuche ------------
410 ifve<>11then500
415 ifo1=0thengosub54000:goto500
420 sa=os(o1):gosub53400:gosub53500:ob$="[196]"+right$(i$,len(i$)-1)
425 ifob(o1)=-1then430
430 ifob(o1)<>znthenx$=ob$+" ist hier nicht zu sehen!":gosub53900:goto500
440 ifou(o1)=0thenx$=ob$+" hat keine besonderen [205]erkmale.":gosub53900
450 ifou(o1)thensa=ou(o1):gosub53800
500 rem nimm ------------------------
505 ifve<>12then600
506 ifsp=1then550:rem nimm alles
507 sa=os(o1):gosub53400:gosub53500:ob$="[196]"+right$(i$,len(i$)-1)
510 ifo1=0thenprint"[201]hr [211]atz enth[176]lt kein [207]bjekt !":goto600
514 :ifob(o1)=-1thenprint"[196]as haben [211]ie bereits !":goto600
515 :ifob(o1)<>znthenx$=ob$+" ist hier nicht zu sehen!":gosub53900:goto600
516 ifoa(o1)=0then600
520 :ifoa(o1)=1thenprint"[194]izarr!":goto600
525 :ifoa(o1)=2thenx$=ob$+" ist viel zu schwer zum tragen!":gosub53900:goto600
530 :ifoa(o1)=3thenprint"[199]enommen.":ob(o1)=-1:goto600
550 :
554 print:fori=1tooz
555 :ifob(i)<>znthen580
556 sa=os(i):gosub53400:gosub53500:ob$="[196]"+right$(i$,len(i$)-1)
560 :i$=ob$+": "
565 ifsq=1andi=o1then580:rem ausser
570 :ifoa(i)=1thenprinti$;"[194]izarr !"
575 :ifoa(i)=2thenprinti$;"[218]u schwer zum tragen !"
577 :ifoa(i)=3thenprinti$;"[199]enommen.":ob(i)=-1
580 nexti
600 rem inventur -----------------
601 ifve<>13then700
605 print"[211]ie haben: [145]"
610 ic=0:fori=1tooz
611 sa=os(i):gosub53400:gosub53500:ob$="[196]"+right$(i$,len(i$)-1):i$=ob$
612 :ifleft$(i$,3)="[196]er"thenj$=right$(i$,len(i$)-3):i$="[196]en"+j$
615 :ifob(i)=-1thenprint"";i$:ic=1
620 nexti:ific=0thenprint"[194]ock auf [194]ier !"
700 rem verliere -----------------
701 ifve<>14then800
702 ifsp=1then750: rem verlier alles
703 ifo1=0thenprint"[201]hr [211]atz enth[176]lt kein [207]bjekt!":goto800
705 ifob(o1)<>-1thenprint"[211]ie haben das nicht !":goto800
715 ob(o1)=zn:print"[207]k.":goto800
750 ic=0:fori=1tooz
755 :ifsq=1andi=o1then780:rem ausser
760 sa=os(i):gosub53400:gosub53500:ob$="[196]"+right$(i$,len(i$)-1):i$=ob$+": "
770 :ifob(i)=-1thenob(i)=zn:printi$;"[207]k.":ic=1
780 nexti:ific=0andsq=1thenprint"[215]ie soll das gehen ?"
782 ific=0andsq=0thenprint"[211]ie haben doch garnichts !"
800 :
2000 rem raumspezifische action ------------------------------------------------
50000 rem *****************************
50001 rem * *
50002 rem * wort-parser 4.0 *
50003 rem * *
50004 rem * <c> 1986 bei *
50005 rem * *
50006 rem * michael nickles *
50007 rem * *
50008 rem *****************************
50010 rem befehlssatzeingabe ---------------------------------------------------
50011 zw=0:print:gosub53000:mo=mo+1:rem titelline ausgeben
50012 ifud>0then50500:rem und
50015 sl=77: rem befehlssatzlaenge
50020 be$="":poke198,0:print"[158]>[164]";
50030 getx$:ifpeek(203)=1then50120
50040 ifx$=""then50030
50050 iflen(be$)=0andasc(x$)=20then50030
50060 i=asc(x$):ifi<32ori>133andi<159thenifi<>20then50030
50070 iflen(be$)=slandi<>20then50030
50080 be$=be$+x$
50090 printchr$(20);x$;"[164]";
50100 ifi=20thenbe$=left$(be$,len(be$)-2):goto50030
50110 goto50030
50120 print"[157] "
50400 rem satzzeichen suchen ---------------------------------------------------
50401 :
50415 sn=0
50420 ifright$(be$,1)=" "thenbe$=left$(be$,len(be$)-1):goto50420
50430 i$=right$(be$,1)
50440 ifi$="."ori$="!"thensn=0:be$=left$(be$,len(be$)-1):goto50420
50450 ifi$="?"thensn=1:be$=left$(be$,len(be$)-1):goto50420
50500 rem be$-zeiger setzen ----------------------------------------------------
50501 :
50502 ifud=0thenve=0:ri=0:o1=0:o2=0:sp=0:sq=0
50504 ifud>0thenri=0:goto50530
50505 ifleft$(be$,1)=" "thenbe$=right$(be$,len(be$)-1):goto50505
50510 be$=be$+" "
50520 za=1 :rem zeiger a setzen
50530 zb=za+1
50540 ifmid$(be$,zb,1)=""thenud=0:close1:open1,8,3,"texte":return
50550 ifmid$(be$,zb,1)<>" "thenzb=zb+1:goto50550
50590 su$=mid$(be$,za,zb-za)
50600 rem su$ vorbehandlung ----------------------------------------------------
50601 :
50610 ifsu$="und"thenud=1:goto50630
50620 ifsu$=","thenud=2:goto50630
50625 goto50670
50630 za=zb+1
50640 ifmid$(be$,za,1)=""thenprint"[213]nd was ?":goto50530
50650 ifmid$(be$,za,1)=" "thenza=za+1:goto50650
50660 close1:open1,8,3,"texte":return
50670 ifsu$="ihn"orsu$="sie"orsu$="es"theno1=om:goto51300
50680 ifsu$="alles"thensp=1:goto51300
50690 ifsu$="ausser"thensq=1:goto51300
51000 rem binaere suchroutine --------------------------------------------------
51001 :
51002 close1:open1,8,3,"wortschatz"
51007 rem anfang und ende des suchbereiches ermitteln
51008 i=asc(left$(su$,1))
51009 ifi-65<0ori-65>25thengosub51500:goto50000
51010 an=in(i-65):rem anfang des suchbereiches
51012 iz=64
51013 ifin(i-iz)=0theniz=iz-1:goto51013
51015 en=in(i-iz)-1:rem ende des suchbereiches
51016 ifan=0thengosub51500:ud=0:goto50000
51020 sz=197:n=int(log(en-an+1)/log(2))+1 :rem maximal-formel
51030 sa=an-1+(2^n)/2:rem mitte der ges.dat
51040 gosub52100:rem a$ lesen
51050 n=n-1 :rem 1.abfrage
51060 :
51070 rem su$ mit a$ vergleichen ------
51080 : iflen(su$)<3then51110
51090 : ifwa=1 and su$=left$(a$,len(su$)) thenve=wc:goto51300
51100 : ifwa<>3orsu$<>right$(a$,len(su$))then51110
51102 : ifud=1orud=2thenud=3:o1=0:o2=0
51104 : ifo1=0theno1=wc:om=o1:goto51300
51105 : ifo2=0theno2=wc:om=o1:goto51300
51110 : ifwa=2 and su$=a$ thenri=wc:goto51300
51115 : ifwa=5 and su$=a$ thenad=wc:goto51300
51120 : ifwa=1 and su$=a$ thenve=wc:goto51300
51125 : ifwa=4 and su$=a$ then51300
51130 : ifsu$<a$thensa=sa-(2^(n-1)):gosub52100:goto51160
51140 : ifsa+(2^(n-1))>sa+en-anandn>-1thenn=n-1:goto51140:rem ''ueberlauf''
51150 : sa=sa+(2^(n-1)):gosub52100:rem ''halbieren''
51160 :
51170 :n=n-1 :rem naechst. halbieren
51180 :ifn<0thengosub51500:ud=0:goto50000
51190 rem print"sa=";sa;" n=";n :rem unnoetig !!
51200 :goto51060:rem naechst. such-vers.
51300 rem naechstes wort
51310 za=zb+1
51320 ifmid$(be$,za,1)=""then50530
51330 ifmid$(be$,za,1)=" "thenza=za+1:goto51330
51350 goto50530
51500 rem ich kenne su$ nicht --------------------------------------------------
51501 :
51510 i=int(3*rnd(1))+1
51520 onigoto51530,51540,51550
51530 x$=""+"[201]ch kenne das [215]ort '"+su$+"' nicht.":goto52000
51540 x$=""+"[196]as [215]ort '"+su$+"' ist mir nicht bekannt.":goto52000
51550 x$=""+"[196]eutsch ist leider nur meine zweite [211]prache. [201]ch kenne das "
51555 x$=x$+"[215]ort '"+su$+"' nicht.":goto52000
52000 rem formatierte textausgabe ----------------------------------------------
52010 ifx$=""then52090
52020 iflen(x$)<40thenprintx$:goto52090
52030 iflen(x$)=40thenprintx$;:goto52090
52040 i$=left$(x$,41):ic=0:fori=1tolen(i$):ifmid$(i$,i,1)=" "thenic=i
52050 nexti:ific=0thenprintx$:goto52090
52060 i$=left$(i$,ic-1):iflen(i$)=40thenprinti$;
52070 iflen(i$)<40thenprinti$
52080 x$=right$(x$,len(x$)-ic):goto52010
52090 return
52100 rem satz-teilbereich lesen -----------------------------------------------
52101 :
52110 hb%=sa/256:lb%=sa-hb%*256
52112 print#15,"p";chr$(3);chr$(lb%);chr$(hb%);chr$(1)
52114 input#15,a:ifa=50thenprint"satznummer zu hoch"
52120 ifa=50thenreturn
52130 input#1,a$
52140 wa=val(mid$(a$,22,1))
52150 wc=val(mid$(a$,23,3))
52160 a$=left$(a$,21)
52170 ifright$(a$,1)=""thena$=left$(a$,len(a$)-1):goto52170
52180 return
53000 rem up - titelline -------------------------------------------------------
53001 :
53010 i1$=" ":t$=""
53020 t$=t$+chr$(18)+r$:i$=str$(sc)+"/"+right$(str$(mo),len(str$(mo))-1)
53030 t$=t$+right$(i1$,41-len(t$)-len(i$))+i$+chr$(146):print"";t$;
53040 print"";:return
53200 rem up - disk einlegen ---------------------------------------------------
53201 :
53205 ific=21thengosub53700:rem weiter
53210 print"[194]itte [196]isk-[211]eite";side;"[157] einlegen ![146]";:poke198,0:wait198,1
53220 print"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157] ";
53221 print"[157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]";
53222 open2,8,2,"#":print#15,"u1 2 0 18 0":print#15,"b-p";2;162:get#2,i$
53224 close2:ifside<>val(i$)then53200
53225 ifside=2thenopen1,8,3,"texte"
53230 return
53400 rem zeiger postionieren --------------------------------------------------
53401 :
53420 hb%=sa/256:lb%=sa-hb%*256:print#15,"p";chr$(3);chr$(lb%);chr$(hb%);chr$(1)
53430 input#15,ia:ifia=50thenprint"satznummer zu hoch"
53440 return
53500 rem satz einlesen --------------------------------------------------------
53501 :
53510 ifa=50then53520
53512 input#1,i$
53515 zw=zw+1:ifzw>23thengosub53700:zw=0
53520 return
53600 rem text-einlesen --------------------------------------------------------
53601 :
53610 ifside<>2thenside=2:gosub53200
53620 gosub53400:rem positonieren
53630 gosub53500:rem i$ einlesen
53640 ifright$(i$,1)<>"*"then53660
53650 :ifi$<>"*"thenprintleft$(i$,len(i$)-1)
53652 :sa=0:return
53660 iflen(i$)<40thenprinti$
53670 iflen(i$)>=40thenprinti$;
53680 sa=sa+1
53695 goto53630
53700 rem weiter ---------------------------------------------------------------
53701 :
53705 print"[weiter]";:poke198,0:wait198,1:print"[157][157][157][157][157][157][157][157] [157][157][157][157][145]
53710 [142]
53800 [143] kommentar lesen ------------------------------------------------------
53801 :
53805 zw[178]1
53810 [153]:[141]53600:[142]
53900 [143] textformer ------------------
53901 :
53902 [139]x$[179][177]""[167][153]
53905 [139]x$[178]""[167]53945
53910 [139][195](x$)[179]40[167][153]x$:[137]53945
53915 [139][195](x$)[178]40[167][153]x$;:[137]53945
53920 i$[178][200](x$,41):ic[178]0:[129]i[178]1[164][195](i$):[139][202](i$,i,1)[178]" "[167]ic[178]i
53925 [130]i:[139]ic[178]0[167][153]x$:[137]53945
53930 i$[178][200](i$,ic[171]1):[139][195](i$)[178]40[167][153]i$;
53935 [139][195](i$)[179]40[167][153]i$
53940 x$[178][201](x$,[195](x$)[171]ic):[137]53905
53945 [142]
53950 [143] artikel-wandler -------------
53951 :
53952 ii$[178][200](ob$,3)
53955 [139]ii$[179][177]"str$er"[175]ii$[179][177]"str$as"[167]53965
53960 x$[178]"":x$[178]"left$ier liegt ein"[170][201](ob$,[195](ob$)[171]3)[170]"."
53965 [139]ii$[179][177]"str$ie"[167]53970
53966 x$[178]"":x$[178]"left$ier liegt eine"[170][201](ob$(i),[195](ob$)[171]3)[170]"."
53970 [137]53905
54000 [143] raumtext-einlesen ----------------------------------------------------
54001 :
54020 [153]:[129]i[178]1[164]oz :[143] ob.tab.
54030 :[139]ob(i)[179][177]zn[167]54080
54035 :[139]ox(i)[179]1[167]54080 :[143] namelos
54040 :sa[178]ox(i):[141]53400 :[143] posit.
54050 :[139]oa(i)[178]1[167][141]53500:r$[178]i$ :[143] read i$, titelline
54060 :[139]wi(zn)[178]1[175]ve[179][177]11[175]oa(i)[178]1[167][153]r$:sa[178]0:[137]54080
54070 :[141]53600 :[143] lesen
54080 [130]i
54081 [129]i[178]1[164]oz
54083 [139]ob(i)[179][177]zn[176]oa(i)[179][177]3[176]ox(i)[179][177]0[167]54088
54084 sa[178]os(i):[141]53400:[141]53500:ob$[178]"str$"[170][201](i$,[195](i$)[171]1)
54085 x$[178]"left$ier liegt "[170]ob$[170]".":zw[178]zw[170]1:[141]53950
54088 [130]i
54095 wi(zn)[178]1:[153]:[142]
60000 [143] tabellen einlesen ----------------------------------------------------
60001 :
63000 [143] *****************************
63005 [143] * mini-texteditor v.iii.4 *
63010 [143] * <c> 1985 *
63015 [143] * von michael nickles *
63020 [143] *****************************
63025 [143] anfangsmenue -----------------
63030 [151]198,0:[133]"dateiname *cmdcmdcmd";d$:[151]198,0
63035 [133]"satzlaenge 40cmdcmdcmdcmd";sl:[139]sl[179]1[176]sl[177]254[167][153]"geht nicht !":[137]30
63040 [159] 15,8,15
63045 [152]15,"i0":[159] 1,8,3,d$:[153]
63050 [143] zwischenmenue ----------------
63055 [153]"s / l / ende wait";
63060 [161]i$:[139]i$[178]""[167]63060
63065 [139]i$[178]"e"[167][153]"load";:[137]63265
63070 [139]i$[179][177]"s"[175]i$[179][177]"l"[167]63060
63075 [133]"satznr";sa:[139] sa[179]0 [176] sa[177]63000 [167]63070
63080 [139]i$[178]"l"[167][153]"load";:[137]63095
63085 [139]i$[178]"s"[167][153]"load";:mo[178]1:[137]63150
63090 [137] 63050
63095 [143] lesen ------------------------
63100 :[153]"load";sa;"cmd-";[196](sa[170]20);" wait"
63105 ia[178]sa
63110 [129] sa[178]ia [164] ia[170]20
63115 : [141]63195:[141]63220
63120 : [139]a[178]50[167]sa[178]ia[170]21:[137]63135
63125 : [139][195](a$)[179]40[167][153]a$
63130 : [139][195](a$)[177][178]40[167][153]a$;
63135 [130]:[153]
63140 [139]a[178]50[167][153]"satznummer zu hoch!"
63145 [137] 63050
63150 [143] schreiben --------------------
63155 [153]"eingabesatz //=keine eingabe"
63160 [141]63195:[143] positionieren
63165 [139]a[178]50[167][153]"satznummer zu hoch!":[137]63050:[143] fehlerkanalabfr.
63170 [141]63330:a$[178]be$ :[143] input-rout.
63175 [139]a$[178]"//"[167]mo[178]0:[137]63050:[143] ende
63180 [141]63240:[143] a$ schreiben
63185 sa[178]sa[170]1 :[143] naechster satz
63190 [137]63160:[143] next (loop)
63195 [143] positionieren ****************
63200 hb%[178]sa[173]256:lb%[178]sa[171]hb%[172]256
63205 [152]15,"p";[199](3);[199](lb%);[199](hb%);[199](1)
63210 [132]15,a
63215 [142]
63220 [143] satz einlesen ****************
63225 [139]a[178]50[167][142]
63230 [132]1,a$
63235 [142]
63240 [143] satz schreiben ***************
63245 [139]a[178]50[167][142]
63250 [139]a$[178]""[167]a$[178]":":[143] zur sicherheit !!!
63255 [152]1,a$
63260 [142]
63265 [143] beenden **********************
63270 [160] 1
63275 [160] 15
63280 [153] "++ ende ++"
63285 [128]
63290 [143] korrektur-routine ------------
63295 [129]i[178]0[164][195](be$):[153][199](20);:[130]i:be$[178]""
63300 sa[178]sa[170]sc : [143] textzeiger
63305 [139]sa[179]0[167]sa[178]0 : [143] sperre
63310 [141] 63195: [143] positionieren
63315 [139]a[178]50[167]sa[178]sa[171]sc:[137]63310
63320 [132]1,a$
63325 [142]
63330 [143] texteingabe ------------------
63335 [139]ar[178]1[167]ar[178]0:a$[178]"satznummer zu hoch!wait":[137]63345
63340 [141]63195:[141]63220
63345 [153]" ";:[153]"satz";sa;"wait"
63350 [153]" on";a$
63355 [153]"tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(tab(";
63360 [153]""
63365 be$[178]"":[151]198,0:[151]211,0:[151]214,22:[158]58732:[153]"systo";
63370 [161]x$:[139][194](203)[178]1[167]63430
63375 [139] [194](203)[178]7[175][194](653)[178]0 [167] sc[178]1 : [141] 63290: [137] 63330
63380 [139] [194](203)[178]7[175][194](653)[178]1 [167] sc[178][171]1 : [141] 63290: [137] 63330
63385 [139]x$[178]""[167]63370
63390 [139][195](be$)[178]0[175][198](x$)[178]20[167]63370
63395 i[178][198](x$):[139]i[179]32[176]i[177]133[175]i[179]159[167][139]i[179][177]20[167]63370
63400 [139][195](be$)[178]sl[175]i[179][177]20[167]63370
63405 [139]x$[178]" "[167]x$[178]""
63410 be$[178]be$[170]x$
63415 [153][199](20);x$;"to";
63420 [139]i[178]20[167]be$[178][200](be$,[195](be$)[171]2):[137]63370
63425 [137]63370
63430 [153]"cmd ":[141]63195
63435 [139]be$[178]""[167]be$[178]":"
63440 [153]"":[142]